<template>
    <el-dialog title="查看商品" :visible="selectItemVisible"
               @update:visible="setselectItemVisible(false)" center
               width="40%">
        <el-form unregisterModule class="item-select-form">
            <el-form-item label="商品名">
                <el-input :value="item.stockName" readonly/>
            </el-form-item>
            <el-form-item label="商品规格">
                <el-input :value="item.stockSpecification" readonly/>
            </el-form-item>
            <el-form-item label="商品类型">
                <el-input v-model="item.stockType" readonly/>
            </el-form-item>
            <el-form-item label="商品数量">
                <el-input :value="item.stockNum" readonly/>
            </el-form-item>
            <el-form-item label="阈值">
                <el-input :value="item.stockThreshold" readonly/>
            </el-form-item>
       </el-form>

        <span slot="footer" class="dialog-footer">
        <el-button @click="setselectItemVisible(false)">返回</el-button>
        </span>
    </el-dialog>
</template>

<script>
    import {mapMutations, mapState} from "vuex";

    export default {

        data() {
            return {
                dialogImageUrl: '',
                dialogVisible: false,
                disabled: false
            };
        },
        computed: {
            ...mapState("item", ["selectItemVisible", "item"]),

        },
        methods: {
            ...mapMutations("item", ["setselectItemVisible"])

        },
    };
</script>

<style>
    .item-select-form {
        padding: 0 40px 0 40px;
    }

    .item-select-form .el-input {
        width: 100%;
    }
</style>
